<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.4"/>
<title>SPI Driver: Delay Attributes</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">SPI Driver
   &#160;<span id="projectnumber">1.1</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.4 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__group2.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a>  </div>
  <div class="headertitle">
<div class="title">Delay Attributes</div>  </div>
</div><!--header-->
<div class="contents">

<p>Delay configuration for the driver.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ga9b5018e9d6279fd4f2416aa3891fb106"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group2.html#ga9b5018e9d6279fd4f2416aa3891fb106">SPI_DELAY_DEFAULT</a>&#160;&#160;&#160;0x00080808</td></tr>
<tr class="memdesc:ga9b5018e9d6279fd4f2416aa3891fb106"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default values specified at baud rate of 62500Hz (or higher) for the driver, system clock being 64MHz.  <a href="#ga9b5018e9d6279fd4f2416aa3891fb106">More...</a><br/></td></tr>
<tr class="separator:ga9b5018e9d6279fd4f2416aa3891fb106"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>Delay configuration for the driver. </p>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="ga9b5018e9d6279fd4f2416aa3891fb106"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SPI_DELAY_DEFAULT&#160;&#160;&#160;0x00080808</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Default values specified at baud rate of 62500Hz (or higher) for the driver, system clock being 64MHz. </p>
<p>This 32-bit value is an example for setting delay value characteristics of the driver. This example is set for a baud rate of 62500Hz, it can be used for higher baud rates (not optimal though). This value is defined relative to the MPC5604B doc as:<br/>
 -bits [3:0]: TD, after transfer delay(0 to F),<br/>
 -bits [7:4]: PTD, prescaler for after transfer delay(0 to 3),<br/>
 -bits [11:8]: ASC, after SCK delay(0 to F),<br/>
 -bits [15:12]: PASC, prescaler for after SCK delay(0 to 3),<br/>
 -bits [19:16]: CSSCK, CS to SCK delay(0 to F),<br/>
 -bits [23:20]: PCSSCK, prescaler for CS to SCK delay(0 to 3),<br/>
 -bits [31:24]: unused.<br/>
<br/>
</p>
<p>Minimum CSSCK, ASC and TD values has to be half a SCK clock period for MPC5604B, on the other hand, external devices may have different needs, so the final values must be the maximum of the minimum values needed by both MPC5604B and the external device.<br/>
<br/>
</p>
<p>Example for MPC5604B communicating with itself @ 62500Hz, a period is 1024 clock cycles when F_periph=F_sys = 64MHz so half a clock is 512 cycles. This value can be set using a prescaler of 1 (0) and a value of 512 (8) for each delay. </p>

<p>Definition at line <a class="el" href="spi__drv_8h_source.html#l00204">204</a> of file <a class="el" href="spi__drv_8h_source.html">spi_drv.h</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated on Mon Aug 19 2013 09:51:11 for SPI Driver by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.4 </li>
  </ul>
</div>
</body>
</html>
